import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MenuComponent } from './menu/menu.component';
import { CommunityComponent } from './page/community/community.component';
import { FindComponent } from './page/find/find.component';
import { FollowComponent } from './page/follow/follow.component';
import { MyComponent } from './page/my/my.component';
import { PageComponent } from './page/page.component';
import { PodcastComponent } from './page/podcast/podcast.component';
import { PlayComponent } from './play/play.component';

const routes: Routes = [
  {path:'',redirectTo:'page/find',pathMatch:'full'},
  {path:'page',component:PageComponent,
  children:[
    // 播客
    {path:'podcast',component:PodcastComponent},
    // 发现
    {path:'find',component:FindComponent},
    // 我的
    {path:'my',component:MyComponent},
    // 社区
    {path:'community',component:CommunityComponent},
    // 关注
    {path:'follow',component:FollowComponent}
  ]},
  {path:'play',component:PlayComponent},
  {path:'menu',component:MenuComponent}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MusicRoutingModule { }
